import styled from 'styled-components';
import { Button } from '../../style';

export const HeaderWrapper = styled.div`
    height: 58px;
    border-bottom: 1px solid #F0F0F0;
    .width-limit {
        display: flex;
        min-width: 768px;
        max-width: 1440px;
        margin: 0 auto;
    }
`;

export const Logo = styled.a`
    flex: 0 0 100px;
    width: 100px;
    height: 58px;
    > img {
        width: 100%;
    }
`;

export const Nav = styled.div`
    flex: 1;
    padding: 0 100px;
`;

export const NavItem = styled.div`
    display: inline-block;
    line-height: 29px;
    font-size: 17px;
    padding: 15px;
    color: #333;
    &.active {
        color: #F00;
    }
`;

export const SearchIcon = styled.div`
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
`;

export const NavSearch = styled.input.attrs({
    placeholder: '搜索'
})`
    width: 240px;
    height: 38px;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
    &::placeholder {
        color: #999;
    }
`;

export const NavSearchWrapper = styled.div`
    display: inline-block;
    height: 38px;
    border-radius: 19px;
    background: #eee;
    margin-top: 10px;
    padding: 0 4px 0 20px;
    &.focused {
        ${SearchIcon} {
            background-color: #969696;
            border-radius: 50%;
            color: #fff;
        }
        ${NavSearch} {
            width: 320px;
            transition: all .2s ease-out;
        }
    }
`;

export const Addition = styled.div`
    display: inline-block;
`;

export const AdditionItem = styled.div`
    display: inline-block;
    line-height: 29px;
    font-size: 14px;
    padding: 15px;
    color: #333;
`;

export const RegButton = styled(Button)`
    width: 80px;
    height: 38px;
    margin: 9px 5px 0 15px;
    border: 1px solid rgba(236,97,73,.7);
    border-radius: 20px;
    color: #ea6f5a;
    background-color: transparent;
`;

export const WriteButton = styled(Button)`
    width: 100px;
    height: 40px;
    margin: 8px 12px 0;
    border-radius: 20px;
    font-size: 15px;
    color: #fff;
    background-color: #ea6f5a;
`;